package com.xunyin.modules.balance.service.mapper;

import com.xunyin.common.mapper.CoreMapper;
import com.xunyin.modules.balance.domain.MtSetting;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 全局设置表 Mapper 接口
 *
 * @Author xunyinyunshang <3594419785@qq.com>
 * @Date 2023-4-11
 * Created by xunyinyunshang
 * CopyRight 讯音云商 https://www.tonetn.com
 */
@Repository
public interface MtSettingMapper extends CoreMapper<MtSetting> {

    @Select("select * FROM mt_setting t where t.type = #{type} and t.store_id = #{storeId}")
    List<MtSetting> querySettingByType(@Param("type") String type, @Param("storeId") Integer storeId);

    @Select("select * FROM mt_setting t where t.name = #{name} and t.store_id = #{storeId}")
    MtSetting querySettingByName(@Param("name") String name, @Param("storeId") Integer storeId);

}
